//
//  UIViewExtension.swift
//  SFWeiBo
//
//  Created by 孙凡 on 16/4/8.
//  Copyright © 2016年 Edward. All rights reserved.
//

import UIKit

extension UIView{


    @IBInspectable var borderColor:UIColor{

        get {

            return UIColor(CGColor: layer.borderColor!)
        }

        set {

            layer.borderColor = newValue.CGColor
        }

    }


    @IBInspectable var borderWidth:CGFloat{

        get {

            return layer.borderWidth
        }

        set {

            layer.borderWidth = newValue
        }


    }



    @IBInspectable var cornerRadius:CGFloat{

        get {
            return layer.cornerRadius
        }

        set {

            layer.cornerRadius = newValue
            layer.masksToBounds = newValue > 0
        }

    }




}